home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / Issue61 / BHO / pSimpleBHO.dpr < prev    next >
Encoding:
Text File  |  2000-07-07  |  818 b   |  34 lines

  1. library pSimpleBHO;
  2.  
  3. uses
  4.   ComServ,
  5.   Windows,
  6.   pSimpleBHO_TLB in 'pSimpleBHO_TLB.pas',
  7.   uInfoBHO in 'uInfoBHO.pas',
  8.   uBHOManager in 'uBHOManager.pas' {frmBHOManager};
  9.  
  10. exports
  11.   DllGetClassObject,
  12.   DllCanUnloadNow,
  13.   DllRegisterServer,
  14.   DllUnregisterServer;
  15.  
  16. {$R *.TLB}
  17.  
  18. {$R *.RES}
  19. var
  20.   Handle: HKey;
  21.   Status, Disposition: Integer;
  22.  
  23. begin
  24.   Status := RegCreateKeyEx( HKEY_LOCAL_MACHINE, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Browser Helper Objects\{5476D9CC-444E-11D4-ACEF-080000178968}',
  25.                 0, '', REG_OPTION_NON_VOLATILE, KEY_READ or KEY_WRITE, nil, Handle, @Disposition );
  26.   if Status = 0 then
  27.   begin
  28.     Status := RegSetValueEx(Handle, PChar(''), 0, REG_SZ,
  29.       PChar('InfoBHO'), Length('InfoBHO') + 1);
  30.     RegCloseKey(Handle);
  31.   end;
  32.  
  33. end.
  34.